@extends('admin.layout.main')

@section('content')
    <div class="breadcrumbs ace-save-state" id="breadcrumbs">
        <ul class="breadcrumb">
            <li>
                <i class="ace-icon fa fa-home home-icon"></i>
                <a href="#">首页</a>
            </li>
            <li class="active"><a href="{{ url('admin/user_list') }}">会员列表</a></li>
            <li class="active"><a href="{{ url('admin/finance_list') }}">财务日志</a></li>
        </ul><!-- /.breadcrumb -->

        <div class="nav-search" id="nav-search">
        </div><!-- /.nav-search -->
    </div>
    <div class="page-content">
        <div class="row">
            <div class="col-xs-12">
                <div class="row left">
                    <h3>
                        {{--<a href="/admin/add_user"><button class="btn btn-white btn-info btn-bold">添加会员</button></a>--}}
                    </h3>
                </div>
                <!-- PAGE CONTENT BEGINS -->
                <div class="row">
                    <div class="col-xs-12">
                        <div class="clearfix">
                            <div class="pull-right tableTools-container"></div>
                        </div>
                    <div class="table-header">
                        <span class="menu-text orange"> 会员账号ID </span>
                        <span>{{$user_name}}</span>
                        <form class="form-search" action="/admin/finance_list" method="post">
                            <input type="hidden" name="_token" value="{{csrf_token()}}"/>
                            <input type="hidden" name="id" value="{{$uid}}"/>

                        <span class="menu-text orange">
                            <select name="cid" id="" class="menu-text orange">
                                <option value="">全部</option>
                                @foreach($price as $k=>$value)
                                    <option value="{{$value->id}}">{{$value->name}}</option>
                                @endforeach
                            </select>
                        </span>
                            <span>
                            <button class="btn btn-info" type="submit" >
                                查找
                            </button>
                            </span>
                        </form>

                    </div>

                    <!-- div.table-responsive -->

                        <!-- div.dataTables_borderWrap -->
                        <div>
                            @if(collect($data)->count() == 0)
                                <h3 style="margin:100px; margin-left: 550px">暂无数据<h3>
                                @else

                            <table id="dynamic-table" class="table table-striped table-bordered table-hover">
                                <thead>
                                <tr>
                                    <th>序号</th>
                                    <th>币种</th>
                                    <th>财务内容</th>
                                    <th class="hidden-480">
                                        变动单价
                                    </th>
                                    <th>
                                        变动数量
                                    </th>
                                    <th class="hidden-480">变动总金额</th>

                                    <th>变动时间</th>
                                    <th>变动状态</th>
                                </tr>
                                </thead>

                                <tbody>


                                @foreach($data as $key=>$val)
                                    <tr>
                                        <td>
                                            <a href="#">{{$key+1}}</a>
                                        </td>
                                        <td>{{$val['name']}}</td>
                                        <td class="hidden-480">
                                            {{$val['note']}}
                                        </td>
                                        <td>{{$val['price']}}</td>
                                        <td class="hidden-480">
                                            {{$val['num']}}
                                        </td>
                                        <td>{{$val['total']}}</td>
                                        <td>{{$val['time']}}</td>
                                        {{--<td>{{$val['blocked_btb']}}</td>--}}
                                        {{--<td>{{$val['time']}}</td>--}}
                                        <td>{{\App\Models\PropertyInfo::$STATUS[$val['status']]}}</td>
                                        <td>
                                            {{--{{\App\Models\User::$REAL_STATUS[$val['real_status']]}}--}}
                                        {{--</td>--}}
                                        {{--<td><a href="/admin/user_info?id={{$val['id']}}">个人信息</a>&nbsp; <a href="/admin/finance_list?id={{$val['id']}}">财务日志</a></td>--}}
                                    </tr>

                                @endforeach

                                @endif
                                </tbody>
                            </table>
                        </div>
                    </div>
                </div>
                <!-- PAGE CONTENT ENDS -->
            </div><!-- /.col -->

            <div class="modal-footer no-margin-top">
                <ul class="pagination pull-right no-margin">
                    @if(empty($url))
                        {{$result->links()}}
                    @else
                        {{$result->appends($url)->links()}}
                    @endif
                </ul>
            </div>
        </div><!-- /.row -->
    </div><!-- /.page-content -->

@endsection
